package com.chenyaowei.product.request;
import com.chenyaowei.marketing.domain.CywSpuDiscount;
import com.chenyaowei.marketing.domain.CywSpuFullReduction;
import com.chenyaowei.product.domain.*;

import java.io.Serializable;
import java.util.List;

public class ProductReleaseRequest implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * {
     *  "spuInfo" : {
     *     "spuName":"商品名称",
     *     "spuDescription":"商品描述",
     *     "catalogId":2,
     *     "brandId":1,
     *  }
     *
     *  "spuDiscount":{"fullCount":2,"discount":0.9,"addOther":true},
     *
     *  "spuFullReduction":{"fullPrice":1000,"reducePrice":200,"addOther":false},
     *
     *  "proSpuImages":"/profile/upload/2023/11/28/na2_20231128205534A013.jpg,/profile/upload/2023/11/28/na2_20231128205536A014.png",
     *
     *  "baseAttrs":[{"attrValue":"生茶","attrName":"工艺"},{"attrValue":"饼茶","attrName":"形状"},{"attrValue":"2023","attrName":"年份"},{"attrValue":"特级","attrName":"等级"}],
     *
     *  "skuList":[
     *      {
     *          "attrs":[
     *              {"attrId":5,"attrValue":"1饼","attrName":"规格"},
     *              {"attrId":6,"attrValue":"默认","attrName":"包装"}
     *          ],
     *          "skuBounds":{"buyBounds":300,"growBounds":200},
     *          "skuName":"1","skuTitle":"1","skuSubTitle":"1","price":"1","skuDesc":"描述",
     *          "skuImages":[
     *              {"imgUrl":"/profile/upload/2023/11/28/na3_20231128205802A018.jpg","defaultImg":0},
     *              {"imgUrl":"/profile/upload/2023/11/28/na3_20231128205805A019.png","defaultImg":1}
     *          ]
     *      }
     *      {"attrs":[{"attrId":5,"attrValue":"1饼","attrName":"规格"},{"attrId":6,"attrValue":"礼盒装","attrName":"包装"}],"skuBounds":{"buyBounds":0,"growBounds":0},"skuName":"2","skuTitle":"2","skuSubTitle":"2","price":"2","skuDesc":"描述","skuImages":[]},
     *  }
     */
    private CywProSpuInfo spuInfo;
    private CywSpuDiscount spuDiscount;
    private CywSpuFullReduction spuFullReduction;
    private String proSpuImages;
    private List<CywProductAttrValue> baseAttrs;
    private List<CywProSkuInfo> skuList;

    public CywProSpuInfo getSpuInfo() {
        return spuInfo;
    }

    public void setSpuInfo(CywProSpuInfo spuInfo) {
        this.spuInfo = spuInfo;
    }

    public CywSpuDiscount getSpuDiscount() {
        return spuDiscount;
    }

    public void setSpuDiscount(CywSpuDiscount spuDiscount) {
        this.spuDiscount = spuDiscount;
    }

    public CywSpuFullReduction getSpuFullReduction() {
        return spuFullReduction;
    }

    public void setSpuFullReduction(CywSpuFullReduction spuFullReduction) {
        this.spuFullReduction = spuFullReduction;
    }


    public String getProSpuImages() {
        return proSpuImages;
    }

    public void setProSpuImages(String proSpuImages) {
        this.proSpuImages = proSpuImages;
    }

    public List<CywProductAttrValue> getBaseAttrs() {
        return baseAttrs;
    }

    public void setBaseAttrs(List<CywProductAttrValue> baseAttrs) {
        this.baseAttrs = baseAttrs;
    }

    public List<CywProSkuInfo> getSkuList() {
        return skuList;
    }

    public void setSkuList(List<CywProSkuInfo> skuList) {
        this.skuList = skuList;
    }

    @Override
    public String toString() {
        return "ProductRequest{" +
                "spuInfo=" + spuInfo +
                ", spuDiscount=" + spuDiscount +
                ", spuFullReduction=" + spuFullReduction +
                ", proSpuImages='" + proSpuImages + '\'' +
                ", baseAttrs=" + baseAttrs +
                ", skuList=" + skuList +
                '}';
    }
}
